import Vue from 'vue'
import Router from 'vue-router'

import login from '../components/login/login.vue'
import User from '../components/user/index.vue'
import home from '@/components/home/home.vue'
import DeviceManager from '@/components/DeviceManager/DeviceManager.vue'
import OrderManager from '@/components/OrderManager/OrderManager.vue'
import VipManager from '@/components/VipManager/VipManager.vue'
import UserManager from '@/components/UserManager/UserManager.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/',
      name: 'User',
      component: User,
      redirect: '/login',
      children: [
        {
          path: 'home',
          name: 'home',
          component: home
        },
        {
          path: 'Device',
          name: 'DeviceManager',
          component: DeviceManager
        },
        {
          path: 'Order',
          name: 'OrderManager',
          component: OrderManager
        }, {
          path: 'Vip',
          name: 'VipManager',
          component: VipManager
        }, {
          path: 'UserM',
          name: 'UserManager',
          component: UserManager
        }

      ]

    }
  ]
})
